﻿<Application
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
	xmlns:con="clr-namespace:Q2Q.UI.Converters"
	xmlns:ctrl="clr-namespace:Q2Q.Controls"
	xmlns:my="clr-namespace:Q2Q"
    x:Class="Application"
    StartupUri="UI\Windows\DesignWindow.xaml"
ShutdownMode="OnExplicitShutdown">
	<Application.Resources>

		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary>
					<con:ItemToEmbeddedStringConverter x:Key="EmbeddedStringConverter" />
				</ResourceDictionary>

				<!--<ResourceDictionary Source="Styles/ColorsAndBrushes.xaml" />-->
				<ResourceDictionary Source="Styles/Theme.Light.xaml" />
				<ResourceDictionary Source="Templates/ComboBox.xaml" />
				<ResourceDictionary Source="Styles/CustomButtonStyles.xaml" />
				<ResourceDictionary Source="Styles/CustomWindowStyle.xaml" />
				<ResourceDictionary Source="Templates/Additional.xaml" />
				<ResourceDictionary Source="Templates/TabControl.xaml" />
				<ResourceDictionary Source="Templates/CheckBox.xaml" />
				<ResourceDictionary Source="Templates/Menu.xaml" />
				<ResourceDictionary>

					<DataTemplate x:Key="AfterActionTemplate">
						<TextBlock Text="{Binding}" />
					</DataTemplate>
				
					
					<!--START VOLUME FADER TEMPLATE -->

					<ControlTemplate x:Key="SliderThumbHorizontalTop" TargetType="{x:Type Thumb}">
						<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
							<Path x:Name="grip" Data="M 0,6 C0,6 5.5,0 5.5,0 5.5,0 11,6 11,6 11,6 11,18 11,18 11,18 0,18 0,18 0,18 0,6 0,6 z" Fill="{StaticResource SliderThumb.Static.Background}" Stretch="Fill" SnapsToDevicePixels="True" Stroke="{StaticResource SliderThumb.Static.Border}" StrokeThickness="1" UseLayoutRounding="True" VerticalAlignment="Center"/>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
					<ControlTemplate x:Key="SliderThumbHorizontalBottom" TargetType="{x:Type Thumb}">
						<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
							<Path x:Name="grip" Data="M 0,12 C0,12 5.5,18 5.5,18 5.5,18 11,12 11,12 11,12 11,0 11,0 11,0 0,0 0,0 0,0 0,12 0,12 z" Fill="{StaticResource SliderThumb.Static.Background}" Stretch="Fill" SnapsToDevicePixels="True" Stroke="{StaticResource SliderThumb.Static.Border}" StrokeThickness="1" UseLayoutRounding="True" VerticalAlignment="Center"/>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>

					<Style x:Key="RepeatButtonTransparent" TargetType="{x:Type RepeatButton}">
						<Setter Property="OverridesDefaultStyle" Value="true"/>
						<Setter Property="Background" Value="Transparent"/>
						<Setter Property="Focusable" Value="false"/>
						<Setter Property="IsTabStop" Value="false"/>
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate TargetType="{x:Type RepeatButton}">
									<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
					</Style>
					<ControlTemplate x:Key="SliderThumbHorizontalDefault" TargetType="{x:Type Thumb}">
						<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
							<Path x:Name="grip" Data="M 0,0 C0,0 11,0 11,0 11,0 11,18 11,18 11,18 0,18 0,18 0,18 0,0 0,0 z" Fill="{DynamicResource SliderThumb.Static.Background}" Stretch="Fill" SnapsToDevicePixels="True" Stroke="{StaticResource SliderThumb.Static.Border}" StrokeThickness="1" UseLayoutRounding="True" VerticalAlignment="Center"/>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{DynamicResource SliderThumb.MouseOver.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{DynamicResource SliderThumb.MouseOver.Border}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{DynamicResource SliderThumb.Pressed.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{DynamicResource SliderThumb.Pressed.Border}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="grip" Value="{DynamicResource SliderThumb.Disabled.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{DynamicResource SliderThumb.Disabled.Border}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
					<ControlTemplate x:Key="SliderHorizontal" TargetType="{x:Type Slider}">
						<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
							<Grid>
								<Grid.RowDefinitions>
									<RowDefinition Height="Auto"/>
									<RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
									<RowDefinition Height="Auto"/>
								</Grid.RowDefinitions>
								<TickBar x:Name="TopTick" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,0,0,2" Placement="Top" Grid.Row="0" Visibility="Collapsed"/>
								<TickBar x:Name="BottomTick" Fill="{TemplateBinding Foreground}" Height="4" Margin="0,2,0,0" Placement="Bottom" Grid.Row="2" Visibility="Collapsed"/>
								<Border x:Name="TrackBackground" BorderBrush="{DynamicResource SliderThumb.Track.Border}" BorderThickness="1" Background="{DynamicResource SliderThumb.Track.Background}" Height="4.0" Margin="5,0" Grid.Row="1" VerticalAlignment="center">
									<Canvas Margin="-6,-1">
										<Rectangle x:Name="PART_SelectionRange" Fill="{StaticResource QOrange}" Height="4.0" Visibility="Hidden"/>
									</Canvas>
								</Border>
								<Track x:Name="PART_Track" Grid.Row="1">
									<Track.DecreaseRepeatButton>
										<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource RepeatButtonTransparent}"/>
									</Track.DecreaseRepeatButton>
									<Track.IncreaseRepeatButton>
										<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource RepeatButtonTransparent}"/>
									</Track.IncreaseRepeatButton>
									<Track.Thumb>
										<Thumb x:Name="Thumb" Focusable="False" Height="18" OverridesDefaultStyle="True" Template="{StaticResource SliderThumbHorizontalDefault}" VerticalAlignment="Center" Width="11"/>
									</Track.Thumb>
								</Track>
							</Grid>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="TickPlacement" Value="TopLeft">
								<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
								<Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbHorizontalTop}"/>
								<Setter Property="Margin" TargetName="TrackBackground" Value="5,2,5,0"/>
							</Trigger>
							<Trigger Property="TickPlacement" Value="BottomRight">
								<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
								<Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbHorizontalBottom}"/>
								<Setter Property="Margin" TargetName="TrackBackground" Value="5,0,5,2"/>
							</Trigger>
							<Trigger Property="TickPlacement" Value="Both">
								<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
								<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
							</Trigger>
							<Trigger Property="IsSelectionRangeEnabled" Value="true">
								<Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
							</Trigger>
							<Trigger Property="IsKeyboardFocused" Value="true">
								<Setter Property="Foreground" TargetName="Thumb" Value="#FFC58325"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
					<ControlTemplate x:Key="SliderThumbVerticalLeft" TargetType="{x:Type Thumb}">
						<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
							<Path x:Name="grip" Data="M 6,11 C6,11 0,5.5 0,5.5 0,5.5 6,0 6,0 6,0 18,0 18,0 18,0 18,11 18,11 18,11 6,11 6,11 z" Fill="{StaticResource SliderThumb.Static.Background}" Stretch="Fill" Stroke="{StaticResource SliderThumb.Static.Border}"/>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
					<ControlTemplate x:Key="SliderThumbVerticalRight" TargetType="{x:Type Thumb}">
						<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
							<Path x:Name="grip" Data="M 12,11 C12,11 18,5.5 18,5.5 18,5.5 12,0 12,0 12,0 0,0 0,0 0,0 0,11 0,11 0,11 12,11 12,11 z" Fill="{StaticResource SliderThumb.Static.Background}" Stretch="Fill" Stroke="{StaticResource SliderThumb.Static.Border}"/>
						</Grid>
						<ControlTemplate.Triggers>
							<Trigger Property="IsMouseOver" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.MouseOver.Border}"/>
							</Trigger>
							<Trigger Property="IsDragging" Value="true">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Pressed.Border}"/>
							</Trigger>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Fill" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Background}"/>
								<Setter Property="Stroke" TargetName="grip" Value="{StaticResource SliderThumb.Disabled.Border}"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
					<ControlTemplate x:Key="SliderThumbVerticalDefault" TargetType="{x:Type Thumb}">
						<Grid HorizontalAlignment="Center" UseLayoutRounding="True" VerticalAlignment="Center">
							<Image x:Name="fader" Source="Images/Fader.png" />
						</Grid>
					</ControlTemplate>
					<ControlTemplate x:Key="SliderVertical" TargetType="{x:Type Slider}">
						<Border x:Name="border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
							<Grid>
								<Grid.ColumnDefinitions>
									<ColumnDefinition Width="Auto"/>
									<ColumnDefinition MinWidth="{TemplateBinding MinWidth}" Width="Auto"/>
									<ColumnDefinition Width="Auto"/>
								</Grid.ColumnDefinitions>
								<TickBar x:Name="TopTick" Grid.Column="0" Fill="{TemplateBinding Foreground}" Margin="0,0,2,0" Placement="Left" Visibility="Collapsed" Width="4"/>
								<TickBar x:Name="BottomTick" Grid.Column="2" Fill="{TemplateBinding Foreground}" Margin="2,0,0,0" Placement="Right" Visibility="Collapsed" Width="4"/>
								<Border x:Name="TrackBackground" BorderBrush="{StaticResource SliderThumb.Track.Border}" BorderThickness="1" Grid.Column="1" HorizontalAlignment="Center" Margin="0,5" Width="4.0" Background="#FF323232">
									<Canvas Margin="-1,-6">
										<Rectangle x:Name="PART_SelectionRange" Fill="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}" Visibility="Hidden" Width="4.0"/>
									</Canvas>
								</Border>
								<Track x:Name="PART_Track" Grid.Column="1">
									<Track.DecreaseRepeatButton>
										<RepeatButton Command="{x:Static Slider.DecreaseLarge}" Style="{StaticResource RepeatButtonTransparent}"/>
									</Track.DecreaseRepeatButton>
									<Track.IncreaseRepeatButton>
										<RepeatButton Command="{x:Static Slider.IncreaseLarge}" Style="{StaticResource RepeatButtonTransparent}"/>
									</Track.IncreaseRepeatButton>
									<Track.Thumb>
										<Thumb x:Name="Thumb" Focusable="False" Height="56" OverridesDefaultStyle="True" Template="{StaticResource SliderThumbVerticalDefault}" VerticalAlignment="Top"/>
									</Track.Thumb>
								</Track>
							</Grid>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="TickPlacement" Value="TopLeft">
								<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
								<Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbVerticalLeft}"/>
								<Setter Property="Margin" TargetName="TrackBackground" Value="2,5,0,5"/>
							</Trigger>
							<Trigger Property="TickPlacement" Value="BottomRight">
								<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
								<Setter Property="Template" TargetName="Thumb" Value="{StaticResource SliderThumbVerticalRight}"/>
								<Setter Property="Margin" TargetName="TrackBackground" Value="0,5,2,5"/>
							</Trigger>
							<Trigger Property="TickPlacement" Value="Both">
								<Setter Property="Visibility" TargetName="TopTick" Value="Visible"/>
								<Setter Property="Visibility" TargetName="BottomTick" Value="Visible"/>
							</Trigger>
							<Trigger Property="IsSelectionRangeEnabled" Value="true">
								<Setter Property="Visibility" TargetName="PART_SelectionRange" Value="Visible"/>
							</Trigger>
							<Trigger Property="IsKeyboardFocused" Value="true">
								<Setter Property="Foreground" TargetName="Thumb" Value="Blue"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
					<Style x:Key="VolumeFaderStyle" TargetType="{x:Type Slider}">
						<Setter Property="Stylus.IsPressAndHoldEnabled" Value="false"/>
						<Setter Property="Background" Value="Transparent"/>
						<Setter Property="BorderBrush" Value="Transparent"/>
						<Setter Property="Foreground" Value="{DynamicResource SliderThumb.Static.Foreground}"/>
						<Setter Property="Template" Value="{DynamicResource SliderHorizontal}"/>
						<Style.Triggers>
							<Trigger Property="Orientation" Value="Vertical">
								<Setter Property="Template" Value="{DynamicResource SliderVertical}"/>
							</Trigger>
						</Style.Triggers>
					</Style>
					<!--END VOLUME FADER STYLE -->

					<Style x:Key="PanStyle" TargetType="{x:Type Slider}">
						<Setter Property="Template" Value="{DynamicResource SliderHorizontal}" />
					</Style>


					<Style TargetType="{x:Type ScrollBar}">
						<Setter Property="Stylus.IsPressAndHoldEnabled" Value="False"/>
						<Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
						<Setter Property="BorderThickness" Value="1,0"/>
						<Setter Property="Width" Value="7"/>
						<Setter Property="MinWidth" Value="7"/>
						<Setter Property="Template">
							<Setter.Value>
								<ControlTemplate TargetType="{x:Type ScrollBar}">
									<Grid x:Name="Bg" SnapsToDevicePixels="True">
										<Grid.RowDefinitions>
											<RowDefinition MaxHeight="0"/>
											<RowDefinition Height="1E-05*"/>
											<RowDefinition MaxHeight="0"/>
										</Grid.RowDefinitions>
										<Border BorderBrush="{DynamicResource WindowColorBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource WindowColorBrush}" Grid.Row="1"/>
										<Track x:Name="PART_Track" IsDirectionReversed="True" IsEnabled="{TemplateBinding IsMouseOver}" Grid.Row="1">
											<Track.DecreaseRepeatButton>
												<RepeatButton Command="ScrollBar.PageUpCommand">
													<RepeatButton.Style>
														<Style TargetType="{x:Type RepeatButton}">
															<Setter Property="OverridesDefaultStyle" Value="True"/>
															<Setter Property="Background" Value="Transparent"/>
															<Setter Property="Focusable" Value="False"/>
															<Setter Property="IsTabStop" Value="False"/>
															<Setter Property="Template">
																<Setter.Value>
																	<ControlTemplate TargetType="{x:Type RepeatButton}">
																		<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
																	</ControlTemplate>
																</Setter.Value>
															</Setter>
														</Style>
													</RepeatButton.Style>
												</RepeatButton>
											</Track.DecreaseRepeatButton>
											<Track.IncreaseRepeatButton>
												<RepeatButton Command="ScrollBar.PageDownCommand">
													<RepeatButton.Style>
														<Style TargetType="{x:Type RepeatButton}">
															<Setter Property="OverridesDefaultStyle" Value="True"/>
															<Setter Property="Background" Value="Transparent"/>
															<Setter Property="Focusable" Value="False"/>
															<Setter Property="IsTabStop" Value="False"/>
															<Setter Property="Template">
																<Setter.Value>
																	<ControlTemplate TargetType="{x:Type RepeatButton}">
																		<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
																	</ControlTemplate>
																</Setter.Value>
															</Setter>
														</Style>
													</RepeatButton.Style>
												</RepeatButton>
											</Track.IncreaseRepeatButton>
											<Track.Thumb>
												<Thumb>
													<Thumb.Style>
														<Style TargetType="{x:Type Thumb}">
															<Setter Property="OverridesDefaultStyle" Value="True"/>
															<Setter Property="IsTabStop" Value="False"/>
															<Setter Property="Template">
																<Setter.Value>
																	<ControlTemplate TargetType="{x:Type Thumb}">
																		<Rectangle x:Name="rectangle" Fill="{DynamicResource Color9Brush}" Height="{TemplateBinding Height}" SnapsToDevicePixels="True" Width="{TemplateBinding Width}"/>
																		<ControlTemplate.Triggers>
																			<Trigger Property="IsMouseOver" Value="True">
																				<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource QOrangeShadow}"/>
																			</Trigger>
																			<Trigger Property="IsDragging" Value="True">
																				<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource QOrangeHighlight}"/>
																			</Trigger>
																		</ControlTemplate.Triggers>
																	</ControlTemplate>
																</Setter.Value>
															</Setter>
														</Style>
													</Thumb.Style>
												</Thumb>
											</Track.Thumb>
										</Track>
									</Grid>
								</ControlTemplate>
							</Setter.Value>
						</Setter>
						<Style.Triggers>
							<Trigger Property="Orientation" Value="Horizontal">
								<Setter Property="Width" Value="Auto"/>
								<Setter Property="MinWidth" Value="0"/>
								<Setter Property="Height" Value="7"/>
								<Setter Property="MinHeight" Value="7"/>
								<Setter Property="BorderThickness" Value="0,1"/>
								<Setter Property="Template">
									<Setter.Value>
										<ControlTemplate TargetType="{x:Type ScrollBar}">
											<Grid x:Name="Bg" SnapsToDevicePixels="True">
												<Grid.ColumnDefinitions>
													<ColumnDefinition MaxWidth="0"/>
													<ColumnDefinition Width="1E-05*"/>
													<ColumnDefinition MaxWidth="0"/>
												</Grid.ColumnDefinitions>
												<Border BorderBrush="{DynamicResource WindowColorBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{DynamicResource WindowColorBrush}" Grid.Column="1"/>
												<Track x:Name="PART_Track" Grid.Column="1" IsEnabled="{TemplateBinding IsMouseOver}">
													<Track.DecreaseRepeatButton>
														<RepeatButton Command="ScrollBar.PageLeftCommand">
															<RepeatButton.Style>
																<Style TargetType="{x:Type RepeatButton}">
																	<Setter Property="OverridesDefaultStyle" Value="True"/>
																	<Setter Property="Background" Value="Transparent"/>
																	<Setter Property="Focusable" Value="False"/>
																	<Setter Property="IsTabStop" Value="False"/>
																	<Setter Property="Template">
																		<Setter.Value>
																			<ControlTemplate TargetType="{x:Type RepeatButton}">
																				<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
																			</ControlTemplate>
																		</Setter.Value>
																	</Setter>
																</Style>
															</RepeatButton.Style>
														</RepeatButton>
													</Track.DecreaseRepeatButton>
													<Track.IncreaseRepeatButton>
														<RepeatButton Command="ScrollBar.PageRightCommand">
															<RepeatButton.Style>
																<Style TargetType="{x:Type RepeatButton}">
																	<Setter Property="OverridesDefaultStyle" Value="True"/>
																	<Setter Property="Background" Value="Transparent"/>
																	<Setter Property="Focusable" Value="False"/>
																	<Setter Property="IsTabStop" Value="False"/>
																	<Setter Property="Template">
																		<Setter.Value>
																			<ControlTemplate TargetType="{x:Type RepeatButton}">
																				<Rectangle Fill="{TemplateBinding Background}" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}"/>
																			</ControlTemplate>
																		</Setter.Value>
																	</Setter>
																</Style>
															</RepeatButton.Style>
														</RepeatButton>
													</Track.IncreaseRepeatButton>
													<Track.Thumb>
														<Thumb>
															<Thumb.Style>
																<Style TargetType="{x:Type Thumb}">
																	<Setter Property="OverridesDefaultStyle" Value="True"/>
																	<Setter Property="IsTabStop" Value="False"/>
																	<Setter Property="Template">
																		<Setter.Value>
																			<ControlTemplate TargetType="{x:Type Thumb}">
																				<Rectangle x:Name="rectangle" Fill="{DynamicResource Color9Brush}" Height="{TemplateBinding Height}" SnapsToDevicePixels="True" Width="{TemplateBinding Width}"/>
																				<ControlTemplate.Triggers>
																					<Trigger Property="IsMouseOver" Value="True">
																						<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource QOrangeShadow}"/>
																					</Trigger>
																					<Trigger Property="IsDragging" Value="True">
																						<Setter Property="Fill" TargetName="rectangle" Value="{DynamicResource QOrangeHighlight}"/>
																					</Trigger>
																				</ControlTemplate.Triggers>
																			</ControlTemplate>
																		</Setter.Value>
																	</Setter>
																</Style>
															</Thumb.Style>
														</Thumb>
													</Track.Thumb>
												</Track>
											</Grid>
										</ControlTemplate>
									</Setter.Value>
								</Setter>
							</Trigger>
						</Style.Triggers>
					</Style>

					<ControlTemplate x:Key="ScrollViewerTemplate" TargetType="{x:Type ScrollViewer}">
						<Grid x:Name="Grid" Background="{TemplateBinding Background}">
							<Grid.ColumnDefinitions>
								<ColumnDefinition Width="*"/>
							</Grid.ColumnDefinitions>
							<Grid.RowDefinitions>
								<RowDefinition Height="*"/>
								<RowDefinition Height="Auto"/>
							</Grid.RowDefinitions>
							<Rectangle x:Name="Corner" Grid.Column="1" Fill="{DynamicResource QOrange}" Grid.Row="1" Width="4" HorizontalAlignment="Right"/>
							<ScrollContentPresenter x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False" CanVerticallyScroll="False" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" Grid.Column="0" Margin="{TemplateBinding Padding}" Grid.Row="0"/>
							<ScrollBar x:Name="PART_VerticalScrollBar" HorizontalAlignment="Right" AutomationProperties.AutomationId="VerticalScrollBar" Cursor="Arrow" Maximum="{TemplateBinding ScrollableHeight}" Minimum="0" Grid.Row="0" Visibility="{TemplateBinding ComputedVerticalScrollBarVisibility}" Value="{Binding VerticalOffset, Mode=OneWay, RelativeSource={RelativeSource TemplatedParent}}" ViewportSize="{TemplateBinding ViewportHeight}" Style="{DynamicResource ScrollBarStyle_Simple}"/>
						</Grid>
					</ControlTemplate>

				</ResourceDictionary>
				
				<ResourceDictionary Source="Templates/TextBox.xaml" />
			</ResourceDictionary.MergedDictionaries>
		</ResourceDictionary>
	</Application.Resources>
</Application>